package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@CrossOrigin(origins = "*")
public class IndexController {
    @RequestMapping("/")
    public String index() {
        return "/WEB-INF/jsp/index.jsp";
    }

    @RequestMapping("/ToMenu_user")
    public String menu_user() {
        return "menu_user";
    }

    @RequestMapping("/ToSuccess")
    public String success() {
        return "success";
    }

    @RequestMapping("/ToError")
    public String error() {
        return "error";
    }

    @RequestMapping("/ToMenu_adm")
    public String menu_adm() {
        return "menu_adm";
    }

    @GetMapping("/view")
    public String view(){
//        log.info("展示所有场地");
        return "View";
    }
    @GetMapping("/view2")
    public String view2(){
//        log.info("展示所有场地");
        return "View2";
    }

}
